import 'package:business_boost/bridge/boost_bridge.dart';
import 'package:business_boost/routes/boost_routes.dart';
import 'package:business_boost/widget/boost_test_bottom_sheet.dart';
import 'package:lib_core/ext/boost_ext.dart';
import 'package:lib_core/lib_core.dart';

class BoostBridgeImpl extends BoostFlutterApi {
  @override
  void showFlutterTransparentDialog(bool useActivityAsContainer) {
    if (useActivityAsContainer) {
      BoostNavigator.instance.push(BoostRoutes.boostTestBottomSheet, withContainer: true, opaque: false);
    }else {
      BoostHostApi().showNativeTransparentDialog(BoostRoutes.boostTestBottomSheet);
    }
  }

  @override
  void jumpToBoostMainPage() {
    BoostNavigator.instance.push(BoostRoutes.boostMainPage, withContainer: true);
  }

  @override
  Future<Map<String, Object>> jumpToBoostMainPageAndReturnValue() async {
    final Map<String, Object>? result =
        await BoostNavigator.instance.push(BoostRoutes.boostMainPage, arguments: {'pigeon': true}, withContainer: true);
    return result ?? {};
  }
}
